nsplits = 12
toolpath = "/data/projects/pro42/r-nitools"
corpath = "/data/projects/pro42/cormats_4mm"

setwd(toolpath)
source("connectivity.R")
source("compare_subjects.R")

setwd(corpath)
cor.files = file.path(corpath, list.files(pattern="desc"))
cor.sublist = ni.load.cors(cor.files)

nvoxs = ncol(cor.sublist[[1]])
split.size = ceiling(nvoxs/nsplits)
split.list = seq(1,nvoxs,by=split.size)

